<html>
<body>
Reports calls to <code>associate()</code> and <code>associateTo()</code> that can be replaced with <code>associateBy()</code> or <code>associateWith()</code>.
<p>
    Both functions accept a transformer function applied to elements of a given sequence or collection (as a receiver).
    The pairs are then used to build the resulting <code>Map</code>.
</p>
<p>
    Given the transformer refers to <code>it</code>, the <code>associate[To]()</code> call can be replaced with more performant <code>associateBy()</code>
    or <code>associateWith()</code>.
</p>
<p><b>Examples:</b></p>
<pre><code>  fun getKey(i: Int) = 1L
  fun getValue(i: Int) = 1L

  fun test() {
      arrayOf(1).associate { getKey(it) to it }  // replaceable 'associate()'
      listOf(1).associate { it to getValue(it) } // replaceable 'associate()'
  }
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>  fun getKey(i: Int) = 1L
  fun getValue(i: Int) = 1L

  fun test() {
      arrayOf(1).associateBy { getKey(it) }
      listOf(1).associateWith { getValue(it) }
  }
</code></pre>
</body>
</html>